<!--Generate by Kevin's CodeBuilder -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
		<meta charset="UTF-8">
		<title>bui-ssm快速开发框架</title>
		<head th:include="source::header"></head>
</head>
<body>
		<div class="form_main_wrap">
			<div class="form_condition"></div>
			<div class="form_grid">
				<table id="datagrid"></table>
			</div>
		</div>
</div>
<script type="application/javascript" th:inline="javascript">
		var curdObj,
			height = 244,
			gridOpts = [(${dataGridJson})];//获取datagrid配置json
			var title = "[(${Lang.attachment_windowTitle})]";//国际化语言
			gridOpts.title = title;
		$(function () {
			var dg = $("#datagrid");
			curdObj = new $B.CURD(dg, gridOpts);
		});
		//打开form.html
		function _openForm(prs,isUpdate,rowData){
			var opts = {
				dataType:'html',
				title:title,
				width:700,
				height:height
			};
			if(isUpdate && rowData){
				opts.rowData = rowData;
			}
			curdObj.window(opts,isUpdate);
		};
		/******工具栏事件集合******/
		window.toolMethods = {
			addFn:function(prs){
				_openForm(prs);
			},
			updateFn:function(prs){
				_openForm(prs,true);
			},
			deleteFn:function(prs){
				curdObj.delChecked();
			},
			lineUpdateFn:function(prs){
				_openForm(prs,true,prs);
			},
			lineDeleteFn:function(prs){
				curdObj.deleteData([prs.id]);
			}
		};
</script>
</body>
</html>
